package com.ly.heart.service.impl;

import java.util.List;

import com.ly.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.SealMapper;
import com.ly.heart.domain.SealEntity;
import com.ly.heart.service.ISealService;

import javax.annotation.Resource;

/**
 * 公司印章类型Service业务层处理
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class SealServiceImpl implements ISealService {

    @Resource
    private SealMapper sealMapper;

    /**
     * 查询公司印章类型
     * @param id 公司印章类型主键
     * @return 公司印章类型
     */
    @Override
    public SealEntity selectSealEntityById (String id) {
        return sealMapper.selectSealEntityById ( id );
    }

    /**
     * 查询公司印章类型列表
     * @param sealEntity 公司印章类型
     * @return 公司印章类型
     */
    @Override
    public List<SealEntity> selectSealEntityList (SealEntity sealEntity) {
        return sealMapper.selectSealEntityList ( sealEntity );
    }

    /**
     * 新增公司印章类型
     * @param sealEntity 公司印章类型
     * @return 结果
     */
    @Override
    public int insertSealEntity (SealEntity sealEntity) {
        sealEntity.setCreateTime ( DateUtils.getNowDate () );
        return sealMapper.insertSealEntity ( sealEntity );
    }

    /**
     * 修改公司印章类型
     * @param sealEntity 公司印章类型
     * @return 结果
     */
    @Override
    public int updateSealEntity (SealEntity sealEntity) {
        return sealMapper.updateSealEntity ( sealEntity );
    }

    /**
     * 批量删除公司印章类型
     * @param ids 需要删除的公司印章类型主键
     * @return 结果
     */
    @Override
    public int deleteSealEntityByIds (String[] ids) {
        return sealMapper.deleteSealEntityByIds ( ids );
    }

    /**
     * 删除公司印章类型信息
     * @param id 公司印章类型主键
     * @return 结果
     */
    @Override
    public int deleteSealEntityById (String id) {
        return sealMapper.deleteSealEntityById ( id );
    }
}
